<div class="subcolumns">
  <div class="c75l">

    <h1 id="page_head">Edit User</h1>

    <?php if(count($error) > 0): ?>
    <div id="error" aria-live="rude">
        <h2>Error:</h2>
        <?php foreach($error as $_error): ?>
            <h3><?php echo $escape->escapeHtml($_error); ?></h3>
        <?php endforeach; ?>
    </div>
    <?php endif; ?>

    <form name="setup" id="setup" method="post" action="<?php echo $basePath; ?>/<?php echo $adminAreaToken; ?>/user-edit/update" accept-charset="utf-8">
    <input type="hidden" name="id_user" value="<?php echo $id_user; ?>" />
    <ul class="ul-form" role="slider">
        <li class="item_label"><h2><label for="user_login" id="agn">User login:</label></h2></li>
        <li class="item_content">
                <input aria-required="true"
                       aria-labelledby="agn"
                       name="user_login"
                       id="user_login"
                       tabindex="1"
                       type="text"
                       size="40"
                       maxlength="255"
                       title="user login cant be changed"
                       value="<?php echo $escape->escapeHtmlAttr($user_result['user_login']); ?>" />
        </li>
        
        <li class="item_label"><h2><label for="user_password" id="upa">User password:</label></h2></li>
        <li class="item_content">
                <input aria-required="true"
                       aria-labelledby="upa"
                       name="user_password"
                       id="user_password"
                       tabindex="2"
                       type="password"
                       size="40"
                       maxlength="255"
                       value="" />
                <br /><br />
                <input aria-required="true"
                       name="user_password2"
                       id="user_password2"
                       tabindex="3"
                       type="password"
                       size="40"
                       maxlength="255"
                       value="" />
        </li>
        
        <li class="item_label"><h2><label for="user_forename" id="cpa">User forename:</label></h2></li>
        <li class="item_content">
                <input aria-required="true"
                       aria-labelledby="agn"
                       name="user_forename"
                       id="user_forename"
                       tabindex="4"
                       type="text"
                       size="40"
                       maxlength="255"
                       value="<?php echo $escape->escapeHtmlAttr($user_result['user_forename']); ?>" />
        </li>
        
        <li class="item_label"><h2><label for="user_lastname" id="uln">User lastname:</label></h2></li>
        <li class="item_content">
                <input aria-required="true"
                       aria-labelledby="uln"
                       name="user_lastname"
                       id="user_lastname"
                       tabindex="5"
                       type="text"
                       size="40"
                       maxlength="255"
                       value="<?php echo $escape->escapeHtmlAttr($user_result['user_lastname']); ?>" />
        </li>
        
        <li class="item_label"><h2><label for="id_status" id="us">User status:</label></h2></li>
        <li class="item_content">
		<select name="id_status" id="id_status" size="1" tabindex="6" aria-labelledby="us">
		<option value="0"<?php if($user_result['id_status']==0): ?> selected="selected" class="selected"<?php endif; ?>>trash&nbsp;&nbsp;</option>
		<option value="100"<?php if($user_result['id_status']==100): ?> selected="selected" class="selected"<?php endif; ?>>inactive&nbsp;&nbsp;</option>
		<option value="200"<?php if($user_result['id_status']==200): ?> selected="selected" class="selected"<?php endif; ?>>active&nbsp;&nbsp;</option>
		</select>
        </li>
        
        <li class="item_label"><h2><label for="id_group" id="ug">User group:</label></h2></li>
        <li class="item_content">
		<select name="id_group" id="id_group" size="1" tabindex="7" aria-labelledby="ug">
		<option value="100"<?php if($user_result['id_group']=='100'): ?> selected="selected" class="selected"<?php endif; ?>>Adminstrator&nbsp;&nbsp;</option>
		<option value="200"<?php if($user_result['id_group']=='200'): ?> selected="selected" class="selected"<?php endif; ?>>Editor&nbsp;&nbsp;</option>
		<option value="300"<?php if($user_result['id_group']=='300'): ?> selected="selected" class="selected"<?php endif; ?>>Contributor&nbsp;&nbsp;</option>
		<option value="400"<?php if($user_result['id_group']=='400'): ?> selected="selected" class="selected"<?php endif; ?>>Webservice&nbsp;&nbsp;</option>
		<option value="500"<?php if($user_result['id_group']=='500'): ?> selected="selected" class="selected"<?php endif; ?>>People&nbsp;&nbsp;</option>
		</select>
        </li>
        
        <li class="item_label"><h2><label for="context_lang" id="ulang">User language:</label></h2></li>
        <li class="item_content">
		<select name="user_lang" id="user_lang" size="1" lang="en"  tabindex="8" aria-labelledby="ulang">
		<?php foreach($languages as $val):  ?>
		<option value="<?php echo $escape->escapeHtmlAttr($val['lang']); ?>"<?php if($user_result['lang']==$val['lang']): ?> selected="selected" class="selected"<?php endif; ?>><?php echo $escape->escapeHtml($val['description']); ?></option>
		<?php endforeach; ?>
		</select>
        </li>
        
        <li class="item_label"><h2><label for="user_timezone" id="utz">User timezone:</label></h2></li>
        <li class="item_content">
		<select name="user_timezone" id="user_timezone" size="1" tabindex="9" aria-labelledby="utz">
		<?php foreach($timezone_identifiers as $timezone): ?>
		<option value="<?php echo $timezone; ?>"<?php if(strcasecmp($user_result['user_timezone'], $timezone)==0): ?> selected="selected" class="selected"<?php endif; ?>><?php echo $timezone; ?>&nbsp;&nbsp;</option>
		<?php endforeach; ?>
		</select>
        </li>
        
        <li class="item_label"><h2><label for="user_email" id="uem">User email:</label></h2></li>
        <li class="item_content">
                <input aria-required="true"
                       aria-labelledby="uem"
                       name="user_email"
                       id="user_email"
                       tabindex="10"
                       type="text"
                       size="40"
                       maxlength="255"
                       value="<?php echo $escape->escapeHtmlAttr($user_result['user_email']); ?>" />
        </li>
        
        <li class="item_label"><h2><label for="user_url" id="uem">User url:</label></h2></li>
        <li class="item_content">
                <input aria-required="true"
                       aria-labelledby="uem"
                       name="user_url"
                       id="user_url"
                       tabindex="11"
                       type="text"
                       size="40"
                       maxlength="255"
                       value="<?php echo $escape->escapeHtmlAttr($user_result['user_url']); ?>" />
        </li>

        <li class="item_label"><h2><label for="user_description" id="ud">User description:</label></h2></li>
        <li class="item_content">
                <textarea name="user_description"
                          id="user_description"
                          aria-labelledby="ud"
                          tabindex="12"
                          cols="50"
                          rows="5"><?php echo $escape->escapeHtmlAttr($user_result['description']); ?></textarea>
        </li>

        <li class="item_label"><h2><label for="submit" id="sub">add new user or cancel:</label></h2></li>
        <li class="item_content">
            <input role="button"
                   aria-labelledby="sub"
                   tabindex="13"
                   type="submit"
                   name="add"
                   id="submit"
                   value="Submit" />

            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

            <input role="button"
                   tabindex="14"
                   aria-labelledby="sub"
                   type="submit"
                   name="cancel"
                   id="cancel"
                   value="Cancel" />
        </li>
    </ul>

    </form>


  </div>
  <div class="c25r right_navigation">
      <?php $partialData['basePath'] = $basePath; $partialData['adminAreaToken'] = $adminAreaToken; ?>
      
      <?php echo $this->partial('layout/_user_navigation.phtml', 
                                $partialData); ?>
  </div>
</div>


